<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=8">
        <meta name="renderer" content="webkit|ie-comp|ie-stand">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>色派网站管理后台登录</title>
        <link type="text/css" rel="stylesheet" href="__CSS__/admin.css">
        <link type="text/css" rel="stylesheet" href="__CSS__/login.css">
        <link type="text/css" rel="stylesheet" href="__PLUGINS__/formValidator/user_form.css">
        <script type="text/javascript" charset="utf-8" src="__JS__/common.js"></script>
        <script type="text/javascript" charset="utf-8" src="__PLUGINS__/formValidator/formValidator-4.1.1.js"></script>
        <script type="text/javascript" charset="utf-8" src="__PLUGINS__/formValidator/formValidatorRegex.js"></script>
        <style type="text/css">    	
            #admin{ height: 40px; border:1px solid #FFFFFF; padding: 0 5px; margin-left: 20px; background: none; color: #FFFFFF; border-radius: 5px; margin-top: 20px;}
            #admin:active{background: #8F8F94;}
            #laoA{height: 40px; border:1px solid #FFFFFF; padding: 0 5px; background: none; color: #FFFFFF;border-radius: 5px; margin-left: 20px;}
            #laoA:active{background: #8F8F94;}
        </style>
        <script type="text/javascript">
//            $(document).ready(function(){
//                $.formValidator.initConfig({theme:"baidu",mode:"AutoTip",submitOnce:true,formID:"user_form_0"});

//                $("#username").formValidator({onEmpty:"请输入用户名",onFocus:"请输入你注册时填写的用户名",tipCss:{height:68,width:144}}).inputValidator({min:5,max:12,onError:"你输入的用户长度不正确,请确认"});
//                $("#mail").formValidator({onEmpty:"请输入邮箱",onFocus:"请输入你注册时填写的邮箱",defaultValue:"@",tipCss:{height:68,width:144}}).inputValidator({min:6,max:60,onError:"请输入邮箱"}).regexValidator({regExp:"email",dataType:"enum",onError:"邮箱格式不正确"});
//                $("#pwd-loing").formValidator({onEmpty:"请输入密码",onFocus:"6~16个字符，包括字母、数字、特殊符号，区分大小写",tipCss:{height:68,width:144}}).inputValidator({min:6,max:16,onError:"你输入的密码长度不正确,请确认"});
//                $("#verifycode").formValidator({onShowText:"请输入验证码",onFocus:"请输入图片中的字符，不分区大小写",onEmpty:"请输入验证码",tipCss:{left:194,height:36,width:144}}).inputValidator({min:1,onError:"请输入验证码"});

//                $.formValidator.reloadAutoTip();
//            });

            $(function(){
                //验证码刷新
                $('#user_change_verifycode_0').click(function(){
                    var random = Math.random();
                    $('#pass_reg_img_verifycode_0').attr('src', "{:U('verify')}" + "?r="+random);
                });
                //管理员登录
                $('#admin').click(function(){
                    var username = $('#username').val();
                    var password = $('#pwd-loing').val();
                    var verify   = $('#verifycode').val();
                    $.post(
                        "/index.php?s=/Admin/login/login.html",
                        {
                            username:username,
                            password:password,
                            verify:verify,
                            is_third:0,
                        },
                        function(data){
                            if(data.code < 0){
                                alert(data.msg);
                            }else{
                                 window.location.href="/index.php?s=/Admin/Index/index.html"; 
                            }
                        }
                    );
                });
                //老A登录
                $('#laoA').click(function(){
                    var username = $('#username').val();
                    var password = $('#pwd-loing').val();
                    var verify   = $('#verifycode').val();
                    $.post(
                        "/index.php?s=/Admin/login/login.html",
                        {
                            username:username,
                            password:password,
                            verify:verify,
                            is_third:1,
                        },
                        function(data){
                            if(data.code < 0){
                                alert(data.msg);
                            }else{
                                 window.location.href="/index.php?s=/Admin/Model/index.html"; 
                            }
                        }
                    );
                });
            })
           
        </script>
    </head>
    <body class="icon-body">
	<!--登录主题部分-->	
	<div class="pure-g-r">
            <div id="wrapper" class="login icon-login">			
                <div class="pure-u-2-5 login-box">
                    <h3>色派网站管理后台登录</h3>
                    <div class="div-li" style="padding-top:20px;">
                        <form id="user_form_0" class="user_form" method="post" action="__SELF__">
                            <p>
                                <label id="label_username" for="username">用户名</label>
                                <input id="username" class="user_input" type="text" name="username" tabindex="1">
                            </p>
                            <p>
                                <label id="label_password" for="password_0">密码</label>
                                <input id="pwd-loing" class="user_input" type="password" name="password" tabindex="2">
                            </p>
<!--                            <p class="user_p_verifycode">
                                <label id="label_verifycode" for="verifycode">验证码</label>
                                <input id="verifycode" class="user_input" style="width:80px;" type="text" name="verify" tabindex="5">
                            </p>
                            <p class="user_p_img_verifycode" id="verifyimg">
                                <img src="{:U('verify')}" class="user_verifycode" id="pass_reg_img_verifycode_0" alt="验证码图片" title="验证码图片" />
                                <span class="user_change_verifycode" id="user_change_verifycode_0">看不清？</span>
                            </p>-->
                            <div class="clear"></div>
                            <p>
                                <!--<input name="提交" type="submit" class="user_submit" id="user_submit" style="margin:10px 0 0 70px;" tabindex="6" value="确认">-->
                                <input type="button" value="管理员登录" id="admin" />
                                <input type="button" value="老A登录" id="laoA" />
                            </p>
                        </form>
                    </div>
<!--                    <div class="login-help">
                        <a href="#">新用户注册</a><a href="#">密码找回？</a>
                    </div>			-->
                </div>
            </div>
        </div>
    </body>    
</html>